package com.example.kpopnews;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.util.Log;

import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.example.kpopnews.theme.Theme;

//******************************************************************
public class KpopNewsFragmentActivity extends SherlockFragmentActivity implements
		KpopNewsConstants
// ******************************************************************
{
	// ******************************************************************
	@Override
	protected void onResume()
	// ******************************************************************
	{
		super.onResume();

		Theme.applyTheme(this);
	}

	// ******************************************************************
	protected void debug(String message)
	// ******************************************************************
	{
		if (Config.IS_DEBUG)
		{
			Log.d(getClass().toString(), "@@@@@@@@@@@@@@@@@@ " + message);
		}
	}

	// ******************************************************************
	protected void addFragment(Fragment fragment, int id)
	// ******************************************************************
	{
		FragmentManager fragmentManager = getSupportFragmentManager();
		fragmentManager.beginTransaction().add(id, fragment).commit();
	}

	// ******************************************************************
	protected void replaceFragment(Fragment fragment, int id)
	// ******************************************************************
	{
		FragmentManager fragmentManager = getSupportFragmentManager();
		fragmentManager.beginTransaction().replace(id, fragment).commit();
	}

}
